"""
Level server/editor for Space Escape
urls.py
"""
from django.conf.urls.defaults import * #@UnusedWildImport
#from django.conf import settings
from webservice_tools.utils import Resource
from django.contrib import admin
#from django.views.generic.simple import direct_to_template
from webservice_tools import urls as ws_urls
#from webservice_tools.views import newResetPass
from mainapp.handlers import LevelHandler, WebLevelHandler
from webservice_tools.views import DocHandler

# Uncomment the next two lines to enable the admin:
# from django.contrib import admin
admin.autodiscover()

VIEWS = patterns('',
    (r'editor', 'mainapp.views.home'),
    (r'^$', Resource(DocHandler)),
    )

Basepatterns = patterns('',
    (r'^level/(?P<ordinal>[\d]+)$', Resource(LevelHandler)),
    (r'^weblevel/(?P<id>[\d]+)$', Resource(WebLevelHandler)),
    (r'^weblevel/?$', Resource(WebLevelHandler)),
    (r'^admin/', include(admin.site.urls)),
    (r'^services?/', include(ws_urls)),
#    (r'^static/(?P<path>.*)$', 'django.views.static.serve',
#                       {'document_root':settings.MEDIA_ROOT}),
    (r'', include(VIEWS)),
)

urlpatterns = patterns('',
#    (r'^seserver/', include(basepatterns)),
    (r'', include(Basepatterns)),
)
